package com.hamster.crmpre.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hamster.crmpre.pojo.SchemeEmployee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.Date;

/**
 * @author Tarry
 * @create 2019/12/31 11:26
 */
@Repository
@Mapper
public interface SchemeEmployeeMapper extends BaseMapper<SchemeEmployee> {
    //定时结束 执行方案，修改state = 1
    @Update("update scheme_employee set state = 1 where scheme_end_time <= #{date}")
    void updateEndScheme(@Param("date") Date date);
}
